package com.example.everying.model.entity.user;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("activity_participation")
@ApiModel(value = "ActivityParticipation对象", description = "用户活动参与记录表")
public class ActivityParticipation {

    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "主键ID")
    private Long id;

    @ApiModelProperty(value = "用户ID")
    private String userId;

    @ApiModelProperty(value = "活动ID（对应 activity_points_config.id ）")
    private Long activityId;

    @ApiModelProperty(value = "参与类型(对应 activity_points_config.type)")
    private String participationType;

    @ApiModelProperty(value = "状态：1-已参与 2-已发放积分 3-无效参与")
    private String status;

    @ApiModelProperty(value = "参与时间")
    private LocalDateTime participationTime;

    @ApiModelProperty(value = "积分流水ID（关联 points_transaction.id ）")
    private Long pointsId;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}